#!/usr/bin/env python
#-*- coding: utf8 -*-

from django.conf.urls import patterns, url
from contacts.views import (ContactListView, ContactDetailView,       ContactEditView, ContactCreateView, ContactDeleteView, ContactAddressEditView)

urlpatterns = patterns('',
        url(r'^$', ContactListView.as_view(), name='contact-list'),
        url(r'^new/$', ContactCreateView.as_view(), name='contact-new'),

        url(r'^edit/(?P<pk>\d+)/$', ContactEditView.as_view(), name='contact-edit'),
        url(r'^edit/(?P<pk>\d+)/address/$', ContactAddressEditView.as_view(), name='contact-edit-address'),
        url(r'^delete/(?P<pk>\d+)/$', ContactDeleteView.as_view(), name='contact-delete'),
        url(r'^(?P<pk>\d+)/$', ContactDetailView.as_view(), name='contact-detail'),
)
